package com.lihua.newideas;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
// 启注解事务管理，等同于xml配置方式的 <tx:annotation-driven /> 使用cglib动态代理
@EnableTransactionManagement(proxyTargetClass = true)
@EnableGlobalMethodSecurity(securedEnabled = true , prePostEnabled = true) // 开启授权注解支持
@EnableDiscoveryClient
@EnableFeignClients
public class NewIdeasApplication {
    public static void main(String[] args) {
        SpringApplication.run(NewIdeasApplication.class, args);
    }

}
